<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>购物车-商品详细页</title>
</head>
<body>
    <h2>购物车-商品详细页</h2>
    <hr>
    <p>商品名称：{{ products.product.name }}</p>
    <p>当前数量：{{ products.quantity }}</p>
    <p>总价：{{ total_price }}元</p>
    <p>收藏时间：{{ products.add_at|date:"Y年-m月-d日 H:i:s" }}</p>
    <hr>
    <form method="post" action="{% url 'cart:cart_update' products.id %}">
        {% csrf_token %}
        <input type="number" name="quantity" value="{{ products.quantity }}" min="1">
        <button type="submit">更新数量</button>
    </form>
    <a href="{% url 'cart:cart_delete' products.id %}" class="btn btn-primary">删除该商品</a>
</body>
</html>